$OpenBSD: patch-src_3rdparty_chromium_media_media_gyp,v 1.1.1.1 2016/12/25 14:13:19 zhuk Exp $
--- src/3rdparty/chromium/media/media.gyp.orig.port	Thu Aug  4 13:45:51 2016
+++ src/3rdparty/chromium/media/media.gyp	Thu Aug  4 14:38:18 2016
@@ -35,6 +35,10 @@
         'use_alsa%': 0,
         'use_pulseaudio%': 0,
       }],
+      # Override to dynamically link the sndio library.
+      ['OS=="openbsd"', {
+        'use_sndio%': 0,
+      }],
       # low memory buffer is used in non-Android based chromecast build due to hardware limitation.
       ['chromecast==1 and OS!="android"', {
         'use_low_memory_buffer%': 1,
@@ -169,6 +173,10 @@
         'audio/pulse/pulse_output.h',
         'audio/pulse/pulse_util.cc',
         'audio/pulse/pulse_util.h',
+        'audio/sndio/sndio_input.cc',
+        'audio/sndio/sndio_input.h',
+        'audio/sndio/sndio_output.cc',
+        'audio/sndio/sndio_output.h',
         'audio/sample_rates.cc',
         'audio/sample_rates.h',
         'audio/scoped_task_runner_observer.cc',
@@ -722,6 +730,24 @@
             'filters/h264_bitstream_buffer.h',
           ],
         }],
+        ['use_sndio == 1', {
+          'link_settings': {
+            'libraries': [
+              '-lsndio',
+            ],
+          },
+          'defines': [
+            'USE_SNDIO',
+          ],
+          'sources!': [
+            'audio/linux/audio_manager_linux.cc',
+          ],
+        }, {  # else: use_sndio == 0
+          'sources!': [
+            'audio/sndio/sndio_output.cc',
+            'audio/sndio/sndio_output.h',
+          ],
+        }],
         ['use_alsa==1', {
           'link_settings': {
             'libraries': [
@@ -748,7 +774,7 @@
             'video/capture/linux/v4l2_capture_delegate_multi_plane.h',
           ],
         }],
-        ['OS=="linux"', {
+        ['OS=="linux" or os_bsd==1', {
           'conditions': [
             ['use_x11==1', {
               'dependencies': [
@@ -1061,7 +1087,7 @@
             'base/simd/filter_yuv_sse2.cc',
           ],
         }],
-        ['OS!="linux" and OS!="win"', {
+        ['OS!="linux" and OS!="win" and os_bsd!=1', {
           'sources!': [
             'base/keyboard_event_counter.cc',
             'base/keyboard_event_counter.h',
